package com.wsz.ucenter.fegin;

import com.wsz.pojo.R;
import com.wsz.pojo.query.EssayQuery;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient("USER")
public interface UserFeginClient {
    //获取后台用户列表
    @GetMapping("/get/users/{page}/{limit}")
    R userList(@PathVariable Long page,
               @PathVariable Long limit);

    //封禁用户
    @PostMapping("/update/enabled")
    R updateEnabled(@RequestParam String userId, @RequestParam Boolean enabled);

    //注册用户的人数
    @GetMapping("/ucenter/count")
    R getUcenterCount(@RequestParam String date);

    @PostMapping("/essays/{userId}/{limit}/{page}")
    R getEaasys(@PathVariable String userId,
                       @PathVariable Long limit,
                       @PathVariable Long page,
                       @RequestBody(required = false) EssayQuery essayQuery);
    @GetMapping("/essay")
    R getEssay(@RequestParam("id") String id);

    @DeleteMapping("/delete/essay/acl")
    R deleteEssayAcl(@RequestParam("id") String id,
                     @RequestParam("userId") String userId);
}
